#include <iostream>

using namespace std;
int main() {
    int n;  //鱼的数目
    scanf("%d",&n);
    int fish[n];  //将鱼的可爱程度存储在数组中
    for (int i = 0; i < n; i++) {
        scanf("%d",&fish[i]);
    }

    for (int i = 0; i < n; i++) {  //n条鱼依次遍历
        int count =0;
        for (int j = i-1; j >=0 ; j--) {  //从每条鱼的前一只开始比
            if (fish[j]<fish[i]){
                count++;
            }
        }
        printf("%d ",count);
    }
    return 0;
}
